import React, { useState } from 'react'
import RmemoB from './RmemoB'

export default function RmemoA() {
  const [val, setVal] = useState('')
  const [str, setStr] = useState('str')
  return (
    <div>
      <div>RmemoA</div>
      <input type="text" value={val} onChange={e => setVal(e.target.value)} />
      <button onClick={() => setStr(val)}>修改</button>
      <RmemoB str={str}></RmemoB>
    </div>
  )
}
